public class siyangyuan  {
    public void useAnimal(Animal a){
        a.eat();
        a.drink();
        if (a instanceof Gou){
            Gou g = (Gou) a;
            g.swimming();
        }else if (a instanceof QingWa){
            QingWa Q = (QingWa) a;
            Q.swimming();
        }
    }
}
